<script setup>
import { ref } from 'vue'
const showPop = ref(false)
const emits = defineEmits(['closeVideo'])
const close = () => {
  showPop.value = false
  emits('closeVideo')
}
const videoUrl = ref(1)
const setData = (data) => {
  showPop.value = true
  videoUrl.value = data
}
defineExpose({
  setData,
  close
})
</script>
<template>
  <transition
    appear
    name="custom-classes-transition"
    enter-active-class="animate__animated  animate__fadeIn"
    leave-active-class="animate__animated animate__faster  animate__fadeOut"
  >
    <div class="video" v-drag v-if="showPop">
      <p class="title">
        <span>监控视频</span>
        <span @click="close"><img src="@img/pop/close_icon.png" alt="" /></span>
      </p>
      <div class="content">
        <img src="@img/pop/play_btn.png" />
      </div>
    </div>
  </transition>
</template>
<style scoped lang="scss">
.video {
  position: fixed;
  z-index: 9;
  top: 50%;
  left: 50%;
  width: 340px;
  height: 250px;
  transform: translate3d(-50%, -50%, 0);
  background: url('@img/pop/zwxj_bg.png');
  background-size: 100% 100%;

  .title {
    display: flex;
    padding: 10px 20px 10px 50px;
    align-items: center;
    font-size: 16px;
    justify-content: space-between;

    span:last-child {
      width: 18px;
      height: 18px;
      cursor: pointer;

      img {
        width: 100%;
        height: 100%;
      }
    }
  }

  .content {
    margin: 12px 20px;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 213, 255, 0.12);
    box-shadow: inset 0px 0px 28px 0px rgba(0, 213, 255, 0.42);
    border: 3px solid #2c8596;

    img {
      width: 37px;
      height: 37px;
    }
  }
}
</style>
